<template>
   <div class="topbar">
         <span class="iconfont icon-jiantou2" @click="goback()"></span>
          <span class="rose">玫瑰花束</span>
          <span class="iconfont icon-fenxiang1"  @click="showShare = true"></span>

          <van-share-sheet
  v-model="showShare"
  title="分享到"
  :options="options"
  @select="onSelect"
/>
</div>
</template>

<script>
import { Toast } from 'vant';
export default {
    data() {
    return {
      showShare: false,
      options: [
        { name: '微信', icon: 'wechat' },
        { name: '微博', icon: 'weibo' },
        { name: '复制链接', icon: 'link' },
        { name: '分享海报', icon: 'poster' },
        { name: '二维码', icon: 'qrcode' },
      ],
    };
  },
methods:{
      onSelect(option) {
      Toast(option.name);
      this.showShare = false;
    },
    goback(){
        this.$router.push("/flower")
    }
}
}
</script>

<style scoped>
@import '../../../public/flower/iconfont.css';
.topbar{   
    display: flex;
   justify-content: space-between;
  height:0.8rem;
  line-height: 0.8rem;
  padding: 0 0.14rem;
  box-sizing: border-box;
}
.iconfont{
    font-size: 0.2rem;  
    color: #d3792e;
}
.rose{
  font-size: 0.18rem;
}
</style>